//
//  OSCommonMacros.h
//  MiAiApp
//
//  Created by 徐阳 on 2017/5/31.
//  Copyright © 2017年 徐阳. All rights reserved.
//

//全局标记字符串，用于 通知 存储

#ifndef OSCommonMacros_h
#define OSCommonMacros_h

#pragma mark - ——————— 用户相关 ————————
//登录状态改变通知
#define KNotificationLoginStateChange @"loginStateChange"

//自动登录成功
#define KNotificationAutoLoginSuccess @"KNotificationAutoLoginSuccess"

//被踢下线
#define KNotificationOnKick @"KNotificationOnKick"

//刷新首页
#define KNotificationRefreshHomePage @"KNotificationRefreshHomePage"

//刷新个人中心
#define KNotificationRefreshMine @"KNotificationRefreshMine"

//极光推送appkey
#define kJpushAppKey @"c615f9281b94618927b47c83"

#define kBgImage [OSTool getBgImage]
#define kJudgBgImage [OSTool getJudgBgImage]
#define kScoreBgImage [OSTool getScoreBgImage]
//用户信息缓存 名称
#define KUserCacheName @"KUserCacheName"

//用户model缓存
#define KUserModelCache @"KUserModelCache"

#define kCacheInfo [[NSUserDefaults standardUserDefaults] valueForKey:@"zkCache"]

//是实时模式
#define isRealTime [kSTRING(kActiveInfo.realTimeFlag) isEqualToString:@"1"]

/*沙盒目录下缓存资源文件目录 */
#define kFileCacheDirectory [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES).firstObject stringByAppendingPathComponent:@"ZCMerchantFileDirectory"]
/*沙盒目录下缓存数据文件目录 */
#define kDataCacheDirectory [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES).firstObject stringByAppendingPathComponent:@"ZCMerchantDataDirectory"]
/*沙盒目录下缓存图片的名字，时间格式到毫秒后一位 */
#define kDocImageName @"yyyyMMddHHmmssSSSS"

#define kSTRING(value) [NSString valueToString:value]//任意类型转换成字符串
#define kLocalFilePath(filePath) [OSTool getFullFilePathWithFileName:filePath]
#define kReplace(value,_replaceStr_) [NSString replaceWithString:value replaceStr:_replaceStr_]//任意类型转换成字符串并且为空的话转换成relace字符串

#pragma mark - ——————— 网络状态相关 ————————

//网络状态变化
#define KNotificationNetWorkStateChange @"KNotificationNetWorkStateChange"



#endif /* OSCommonMacros_h */
